package ss;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
class Jiaozheng extends information{
	   private String Name;
	    private String Mima;
	    private String Mima1;
	    private String Birthday;
	    private String Phone;
	    private String Email;     
	    public Jiaozheng() {
	}
	   public Jiaozheng(String Name,String Mima,String Mima1,String Birthday,String Phone,String Email){
	        this.Name=Name;
	        this.Mima=Mima;
	        this.Mima1=Mima1;
	        this.Birthday=Birthday;
	        this.Phone=Phone;
	        this.Email=Email;
	   }
	        public String getName() {
	    		return Name;
	    	}
	    	public void setName(String name) {
	    		Name = name;
	    	}
	    	public String getMima() {
	    		return Mima;
	    	}
	    	public void setMima(String mima) {
	    		Mima = mima;
	    	}
	    	public String getMima1() {
	    		return Mima1;
	    	}
	    	public void setMima1(String mima1) {
	    		Mima1 = mima1;
	    	}
	    	public String getBirthday() {
	    		return Birthday;
	    	}
	    	public void setBirthday(String birthday) {
	    		Birthday = birthday;
	    	}
	    	public String getPhone() {
	    		return Phone;
	    	}
	    	public void setPhone(String phone) {
	    		Phone = phone;
	    	}
	    	public String getEmail() {
	    		return Email;
	    	}
	    	public void setEmail(String email) {
	    		Email = email;
	    	}
    public boolean mima(){
        if(Mima.equals(Mima1)){
            return true;
        }else{
            return false;
        }
    } 
    public boolean birth() {
		String pat = "\\d{4}-\\d{2}-\\d{2}";
		Pattern p = Pattern.compile(pat);
		Matcher m = p.matcher(Birthday);
		if (m.matches()) {	
			return true;
		} else {	
			return false;
		}
	}
    public boolean phone(){
    	String pat = "(13|15|17|18)+\\d{9}";
		Pattern p = Pattern.compile(pat);
		Matcher m = p.matcher(Phone);
		if (m.matches()) {
			return true;
		} else {
			return false;
		}
    }
    public boolean email(){
        String pat="^\\s*\\w+(?:\\.{0,1}[\\w-]+)*@[a-zA-Z0-9]+(?:[-.][a-zA-Z0-9]+)*\\.[a-zA-Z]+\\s*$";
        Pattern p=Pattern.compile(pat);
        Matcher m=p.matcher(Email);
        if(m.matches()){
            return true;
        }else{
            return false;
        }
    }
}


